public class BluetoothPort extends GpPort
mClosePort, mHandler, mmBytesAvailable, mPrinterId, mState| 构造器和说明 |
|---|
BluetoothPort(int id,
BluetoothDevice device,
Handler handler)
Constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
connect()
Start the ConnectThread to initiate a connection to a remote device.
|
void |
connected(BluetoothSocket socket,
BluetoothDevice device)
Start the ConnectedThread to begin managing a Bluetooth connection
|
void |
stop()
Stop all threads
|
GpCom.ERROR_CODE |
writeDataImmediately(java.util.Vector<java.lang.Byte> data) |
closePortFailed, connectionFailed, connectionLost, connectionToPrinterFailed, getState, invalidPrinter, setStatepublic BluetoothPort(int id,
BluetoothDevice device,
Handler handler)
context - The UI Activity Contexthandler - A Handler to send messages back to the UI Activitypublic void connect()
device - The BluetoothDevice to connectpublic void connected(BluetoothSocket socket,
BluetoothDevice device)
socket - The BluetoothSocket on which the connection was madedevice - The BluetoothDevice that has been connectedpublic void stop()
public GpCom.ERROR_CODE writeDataImmediately(java.util.Vector<java.lang.Byte> data)